#include "qdirveplugin.h"

#include "drivewidget.h"

#include "../../include/qfindresult.h"

#include <qplugin.h>
#include <QVBoxLayout>


QDriveWidget::QDriveWidget(AbstractCore *core):
    m_core(core)
{
    m_widget=new DriverWidget;
    m_text=tr("Drive");
    m_icon=QIcon(":/images/drive.png");
}

QString QDriveWidget::text()
{
    return m_text;
}

QIcon   QDriveWidget::icon()
{
    return m_icon;
}

int     QDriveWidget::index()
{
    return 4;
}

bool QDriveWidget::enabled()
{
    return false;
}

QWidget* QDriveWidget::widget()
{
    return m_widget;
}

QFindResult* QDriveWidget::search(const QString& text,bool sensitive,bool whole)
{
    QFindResult *result=new QFindResult;

    return result;
}


void QDirvePlugin::initPlugin(AbstractCore *core)
{
    QDriveWidget *wid;
    wid=new QDriveWidget(core);
    emit addObject(wid);
}

Q_EXPORT_PLUGIN2(QDirvePlugin, QDirvePlugin)
